package com.huitu.whht.base.core.api.wr.pump;

import com.huitu.api.rest.AbstractApiResource;
import com.huitu.commons.PageUtils;
import com.huitu.whht.api.core.common.response.ApiResultBuilder;
import com.huitu.whht.api.core.common.annotations.SzyCoreApiResource;
import com.huitu.whht.api.core.common.annotations.SzyCoreApiService;
import com.huitu.whht.api.core.common.response.StatusRespBuilder;

import com.huitu.whht.base.core.api.wr.pump.entities.WrPumpB;

import com.huitu.whht.base.core.api.wr.pump.entities.WrPumpBQo;
import com.huitu.whht.base.core.api.wr.pump.service.IWrPumpBService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.List;

import javax.ws.rs.*;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;

/**
 * 说明: 泵站工程基本信息表API,表名称: WR_PUMP_B <br/>
 * 日期: 2019-04-11
 * @author LiuCW
 */
@Component
@SzyCoreApiResource
@Path("wr/pump/b")
public class WrPumpBResource extends AbstractApiResource {

    private static final Logger LOGGER = LoggerFactory.getLogger(WrPumpBResource.class);

    private static final String UUID = "c2a65af7-c811-4994-b6a7-ae1eee1bcaba";

    @Override
    public String getUUID() {
        return UUID;
    }

    @Autowired
    @SzyCoreApiService
    IWrPumpBService wrPumpBService;

    /**
     * @api {get} wr/pump/b/{pumpCd:\\w{12}} [R][G]根据主键查询
     * @apiDescription [G]根据主键查询WR_PUMP_B(泵站工程基本信息表)数据
     * @apiName (generate)select by primary key
     * @apiGroup WR_PUMP_B-泵站工程基本信息表
     * @apiVersion 1.0.0
     * @apiSampleRequest wr/pump/b/420113000043
     * @apiParam   {String}         pumpCd             【必须】泵站工程代码
     * @apiSuccess {String}         pumpCd             泵站工程代码
     * @apiSuccess {String}         pumpNm             泵站名称
     * @apiSuccess {String}         loc                所在地
     * @apiSuccess {String}         projScal           工程规模
     * @apiSuccess {String}         pumpTp             泵站类型
     * @apiSuccess {Double}         insQ               装机流量
     * @apiSuccess {Double}         desHead            设计扬程
     * @apiSuccess {Integer}        pumpNum            水泵数量
     * @apiSuccess {Double}         allEquWw           设备总取水能力
     * @apiSuccess {String}         runCond            运行状况
     * @apiSuccess {String}         engManCd           管理单位代码
     * @apiSuccess {Date}           ts                 时间戳(时间格式 <font color='red'>yyyy-MM-dd HH:mm:ss</font>)
     * @apiSuccess {String}         nt                 备注
     * @apiSuccess {String}         wsReg              供水范围
     * @apiSuccessExample 请求成功:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "pumpCd": "420113000043",
     * "pumpNm": "汉江村一泵站",
     * "loc": "汉江村",
     * "projScal": "5",
     * "pumpTp": "2",
     * "insQ": 0.6,
     * "desHead": 12,
     * "pumpNum": 2,
     * "allEquWw": null,
     * "runCond": null,
     * "engManCd": "010894669",
     * "ts": "2014-07-26 16:49:56.0",
     * "nt": null,
     * "wsReg": null
     *  }
     * }
     * @apiUse exceptions
     */
    @GET
    @Path("{pumpCd:\\w{12}}")
    @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    public Response selectByPrimaryKey(@PathParam("pumpCd") String pumpCd) {
        LOGGER.info("根据主键查询 泵站工程基本信息表,参数 pumpCd:{}", pumpCd);
        return Response.ok(ApiResultBuilder.create(this, wrPumpBService.selectByPrimaryKey(pumpCd))).build();
    }

    /**
     * @api {post} wr/pump/b/list [R][G]根据条件查询
     * @apiDescription [G]根据条件查询WR_PUMP_B(泵站工程基本信息表)数据
     * @apiName (generate)select by filter
     * @apiGroup WR_PUMP_B-泵站工程基本信息表
     * @apiVersion 1.0.0
     * @apiSampleRequest wr/pump/b/list
     * @apiParam   {List(String)}   pumpCdList         (数组)泵站工程代码
     * @apiParam   {String}         pumpCd             泵站工程代码
     * @apiParam   {String}         pumpNm             泵站名称
     * @apiParam   {String}         loc                所在地
     * @apiParam   {List(String)}   projScalList       (数组)工程规模
     * @apiParam   {List(String)}   pumpTpList         (数组)泵站类型
     * @apiParam   {Double}         insQMin            (最小)装机流量
     * @apiParam   {Double}         insQMax            (最大)装机流量
     * @apiParam   {Double}         desHeadMin         (最小)设计扬程
     * @apiParam   {Double}         desHeadMax         (最大)设计扬程
     * @apiParam   {List(Integer)}  pumpNumList        (数组)水泵数量
     * @apiParam   {Double}         allEquWwMin        (最小)设备总取水能力
     * @apiParam   {Double}         allEquWwMax        (最大)设备总取水能力
     * @apiParam   {List(String)}   runCondList        (数组)运行状况
     * @apiParam   {List(String)}   engManCdList       (数组)管理单位代码
     * @apiParam   {String}         engManCd           管理单位代码
     * @apiParam   {Date}           tsBgTm             (开始时间)时间戳
     * @apiParam   {Date}           tsEdTm             (结束时间)时间戳
     * @apiParam   {String}         nt                 备注
     * @apiParam   {String}         wsReg              供水范围
     * @apiSuccess {String}         pumpCd             泵站工程代码
     * @apiSuccess {String}         pumpNm             泵站名称
     * @apiSuccess {String}         loc                所在地
     * @apiSuccess {String}         projScal           工程规模
     * @apiSuccess {String}         pumpTp             泵站类型
     * @apiSuccess {Double}         insQ               装机流量
     * @apiSuccess {Double}         desHead            设计扬程
     * @apiSuccess {Integer}        pumpNum            水泵数量
     * @apiSuccess {Double}         allEquWw           设备总取水能力
     * @apiSuccess {String}         runCond            运行状况
     * @apiSuccess {String}         engManCd           管理单位代码
     * @apiSuccess {Date}           ts                 时间戳
     * @apiSuccess {String}         nt                 备注
     * @apiSuccess {String}         wsReg              供水范围
     * @apiSuccessExample 请求成功:
     * HTTP/1.1 200 OK
     * {
     * "result": [{
     * "pumpCd": "420113000043",
     * "pumpNm": "汉江村一泵站",
     * "loc": "汉江村",
     * "projScal": "5",
     * "pumpTp": "2",
     * "insQ": 0.6,
     * "desHead": 12,
     * "pumpNum": 2,
     * "allEquWw": null,
     * "runCond": null,
     * "engManCd": "010894669",
     * "ts": "2014-07-26 16:49:56.0",
     * "nt": null,
     * "wsReg": null
     *  }]
     * }
     *
     * @apiSuccessExample 分页请求:
     * request header: Rang={max=50;size=50;field=TS DESC}
     * HTTP/1.1 200 OK
     * {
     * "result": [{
     * "pumpCd": "420113000043",
     * "pumpNm": "汉江村一泵站",
     * "loc": "汉江村",
     * "projScal": "5",
     * "pumpTp": "2",
     * "insQ": 0.6,
     * "desHead": 12,
     * "pumpNum": 2,
     * "allEquWw": null,
     * "runCond": null,
     * "engManCd": "010894669",
     * "ts": "2014-07-26 16:49:56.0",
     * "nt": null,
     * "wsReg": null
     *  }],
     * "paging": {
     * "count": 3,
     * "total": 120,
     * "finale": false,
     * "index": 1
     * }
     * }
     * @apiUse header_rang
     * @apiUse exceptions
     */
    @POST
    @Path("list")
    @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    public Response selectList(WrPumpBQo filter) {
        PageUtils.startPageFromRang();
        LOGGER.info("根据条件查询 泵站工程基本信息表,参数 WrPumpBQo:{}", filter);
        return Response.ok(ApiResultBuilder.create(this, wrPumpBService.selectList(filter))).build();
    }

    /**
     * @api {put} wr/pump/b [C][G]新增数据
     * @apiPrivate
     * @apiDescription [G]新增WR_PUMP_B(泵站工程基本信息表)数据
     * @apiName (generate)add data
     * @apiGroup WR_PUMP_B-泵站工程基本信息表
     * @apiVersion 1.0.0
     * @apiParam   {String}         pumpCd             【必须】泵站工程代码
     * @apiParam   {String}         pumpNm             【必须】泵站名称
     * @apiParam   {String}         loc                所在地
     * @apiParam   {String}         projScal           工程规模
     * @apiParam   {String}         pumpTp             泵站类型
     * @apiParam   {Double}         insQ               装机流量
     * @apiParam   {Double}         desHead            设计扬程
     * @apiParam   {Integer}        pumpNum            水泵数量
     * @apiParam   {Double}         allEquWw           设备总取水能力
     * @apiParam   {String}         runCond            运行状况
     * @apiParam   {String}         engManCd           【必须】管理单位代码
     * @apiParam   {Date}           ts                 时间戳(时间格式 <font color='red'>yyyy-MM-dd HH:mm:ss</font>)
     * @apiParam   {String}         nt                 备注
     * @apiParam   {String}         wsReg              供水范围
     * @apiSuccess {Integer}        status             1:新增成功;0:新增失败.
     * @apiSuccess {String}         message            成功/失败消息内容
     * @apiSuccess {Object}         data               额外返回的数据,通常包含新增数据的主键值
     * @apiSampleRequest wr/pump/b
     * @apiSuccessExample 新增成功:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":1,
     * "message":"成功",
     * "data":{
     *   "pumpCd": "420113000043"
     *      }
     *   }
     * }
     @apiSuccessExample 新增失败:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":0,
     * "message":"失败",
     * "data":{
     *   "pumpCd": "420113000043"
     *      }
     *   }
     * }
     * @apiParamExample {json} 请求示例:
     * {
     * "pumpCd": "420113000043",
     * "pumpNm": "汉江村一泵站",
     * "loc": "汉江村",
     * "projScal": "5",
     * "pumpTp": "2",
     * "insQ": 0.6,
     * "desHead": 12,
     * "pumpNum": 2,
     * "allEquWw": null,
     * "runCond": null,
     * "engManCd": "010894669",
     * "ts": "2014-07-26 16:49:56.0",
     * "nt": null,
     * "wsReg": null
     * }
     * @apiUse exceptions
     */
    @PUT
    @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    public Response insert(WrPumpB record) {
        LOGGER.info("新增 泵站工程基本信息表,参数 WrPumpB:{}", record);
        return Response.ok(ApiResultBuilder.create(this, StatusRespBuilder.insert(wrPumpBService.insertSelective(record),record))).build();
    }

    /**
     * @api {post} wr/pump/b/insertBatch [C][G]批量新增数据
     * @apiPrivate
     * @apiDescription [G]批量新增WR_PUMP_B(泵站工程基本信息表)数据
     * @apiName (generate)addBatch data
     * @apiGroup WR_PUMP_B-泵站工程基本信息表
     * @apiVersion 1.0.0
     * @apiParam   {String}         pumpCd             【必须】泵站工程代码
     * @apiParam   {String}         pumpNm             【必须】泵站名称
     * @apiParam   {String}         loc                所在地
     * @apiParam   {String}         projScal           工程规模
     * @apiParam   {String}         pumpTp             泵站类型
     * @apiParam   {Double}         insQ               装机流量
     * @apiParam   {Double}         desHead            设计扬程
     * @apiParam   {Integer}        pumpNum            水泵数量
     * @apiParam   {Double}         allEquWw           设备总取水能力
     * @apiParam   {String}         runCond            运行状况
     * @apiParam   {String}         engManCd           【必须】管理单位代码
     * @apiParam   {Date}           ts                 时间戳(时间格式 <font color='red'>yyyy-MM-dd HH:mm:ss</font>)
     * @apiParam   {String}         nt                 备注
     * @apiParam   {String}         wsReg              供水范围
     * @apiSuccess {Integer}        status             1:新增成功;0:新增失败.
     * @apiSuccess {String}         message            成功/失败消息内容
     * @apiSuccess {Object}         data               额外返回的数据,通常包含新增数据的主键值
     * @apiSampleRequest wr/pump/b/insertBatch
     * @apiSuccessExample 新增成功:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":1,
     * "message":"成功",
     * "data":{
     *   "pumpCd": "420113000043"
     *      }
     *   }
     * }
     @apiSuccessExample 新增失败:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":0,
     * "message":"失败",
     * "data":{
     *   "pumpCd": "420113000043"
     *      }
     *   }
     * }
     * @apiParamExample {json} 请求示例:
     * [{
     * "pumpCd": "420113000043",
     * "pumpNm": "汉江村一泵站",
     * "loc": "汉江村",
     * "projScal": "5",
     * "pumpTp": "2",
     * "insQ": 0.6,
     * "desHead": 12,
     * "pumpNum": 2,
     * "allEquWw": null,
     * "runCond": null,
     * "engManCd": "010894669",
     * "ts": "2014-07-26 16:49:56.0",
     * "nt": null,
     * "wsReg": null
     * }]
     * @apiUse exceptions
     */
    @POST
    @Path("insertBatch")
    @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    public Response insertBatch(List<WrPumpB> recordList) {
        LOGGER.info("批量新增 泵站工程基本信息表,参数 WrPumpB:[]", recordList);
        return Response.ok(ApiResultBuilder.create(this, StatusRespBuilder.insert(wrPumpBService.insertBatch(recordList),recordList))).build();
    }

    /**
     * @api {put} wr/pump/b/{pumpCd:\\w{12}}/update [U][G]根据主键修改
     * @apiPrivate
     * @apiDescription [G]根据主键修改WR_PUMP_B(泵站工程基本信息表)数据
     * @apiName (generate)update data
     * @apiGroup WR_PUMP_B-泵站工程基本信息表
     * @apiVersion 1.0.0
     * @apiParam   {String}         pumpCd             【必须】泵站工程代码
     * @apiParam   {String}         pumpNm             【必须】泵站名称
     * @apiParam   {String}         loc                所在地
     * @apiParam   {String}         projScal           工程规模
     * @apiParam   {String}         pumpTp             泵站类型
     * @apiParam   {Double}         insQ               装机流量
     * @apiParam   {Double}         desHead            设计扬程
     * @apiParam   {Integer}        pumpNum            水泵数量
     * @apiParam   {Double}         allEquWw           设备总取水能力
     * @apiParam   {String}         runCond            运行状况
     * @apiParam   {String}         engManCd           【必须】管理单位代码
     * @apiParam   {Date}           ts                 【必须】时间戳
     * @apiParam   {String}         nt                 备注
     * @apiParam   {String}         wsReg              供水范围
     * @apiSuccess {Integer}        status             1:修改成功;0:要修改的数据不存在(可能已被删除)
     * @apiSuccess {String}         message            成功/失败消息内容
     * @apiSuccess {Object}         data               额外返回的数据
     * @apiSampleRequest wr/pump/b/420113000043/update
     * @apiSuccessExample 修改成功:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":1,
     * "message":"成功",
     * "data":null
     *   }
     * }
     * @apiSuccessExample 修改失败:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":0,
     * "message":"失败",
     * "data":null
     *   }
     * }
     * @apiParamExample {json} 请求示例:
     * {
     * "pumpCd": "420113000043",
     * "pumpNm": "汉江村一泵站",
     * "loc": "汉江村",
     * "projScal": "5",
     * "pumpTp": "2",
     * "insQ": 0.6,
     * "desHead": 12,
     * "pumpNum": 2,
     * "allEquWw": null,
     * "runCond": null,
     * "engManCd": "010894669",
     * "ts": "2014-07-26 16:49:56.0",
     * "nt": null,
     * "wsReg": null
     * }
     * @apiUse exceptions
     */
    @PUT
    @Path("{pumpCd:\\w{12}}/update")
    @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    public Response update(@PathParam("pumpCd") String pumpCd, WrPumpB record) {
        record.setPumpCd(pumpCd);
        LOGGER.info("根据主键修改 泵站工程基本信息表,参数 WrPumpB:{}", record);
        return Response.ok(ApiResultBuilder.create(this, StatusRespBuilder.update(wrPumpBService.updateByPrimaryKey(record)))).build();
    }

    /**
     * @api {put} wr/pump/b/{pumpCd:\\w{12}}/update-selective [U][G]根据主键修改(只修改非null字段)
     * @apiPrivate
     * @apiDescription [G]根据主键修改WR_PUMP_B(泵站工程基本信息表)数据,只修改非null字段
     * @apiName (generate)update selected data
     * @apiGroup WR_PUMP_B-泵站工程基本信息表
     * @apiVersion 1.0.0
     * @apiParam   {String}         pumpCd             泵站工程代码
     * @apiParam   {String}         pumpNm             泵站名称
     * @apiParam   {String}         loc                所在地
     * @apiParam   {String}         projScal           工程规模
     * @apiParam   {String}         pumpTp             泵站类型
     * @apiParam   {Double}         insQ               装机流量
     * @apiParam   {Double}         desHead            设计扬程
     * @apiParam   {Integer}        pumpNum            水泵数量
     * @apiParam   {Double}         allEquWw           设备总取水能力
     * @apiParam   {String}         runCond            运行状况
     * @apiParam   {String}         engManCd           管理单位代码
     * @apiParam   {Date}           ts                 时间戳
     * @apiParam   {String}         nt                 备注
     * @apiParam   {String}         wsReg              供水范围
     * @apiSuccess {Integer}        status             1:修改成功;0:要修改的数据不存在(可能已被删除)
     * @apiSuccess {String}         message            成功/失败消息内容
     * @apiSuccess {Object}         data               额外返回的数据
     * @apiSampleRequest wr/pump/b/420113000043/update-selective
     * * @apiSuccessExample 修改成功:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":1,
     * "message":"成功",
     * "data":null
     *   }
     * }
     * @apiSuccessExample 修改失败:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":0,
     * "message":"失败",
     * "data":null
     *   }
     * }
     * @apiParamExample {json} 请求示例:
     * {
     * "pumpCd": "420113000043",
     * "pumpNm": "汉江村一泵站",
     * "loc": "汉江村",
     * "projScal": "5",
     * "pumpTp": "2",
     * "insQ": 0.6,
     * "desHead": 12,
     * "pumpNum": 2,
     * "allEquWw": null,
     * "runCond": null,
     * "engManCd": "010894669",
     * "ts": "2014-07-26 16:49:56.0",
     * "nt": null,
     * "wsReg": null
     * }
     * @apiUse exceptions
     */
    @PUT
    @Path("{pumpCd:\\w{12}}/update-selective")
    @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    public Response updateSelective(@PathParam("pumpCd") String pumpCd, WrPumpB record) {
        record.setPumpCd(pumpCd);
        LOGGER.info("根据主键修改(只修改非null字段) 泵站工程基本信息表,参数 WrPumpB:{}", record);
        return Response.ok(ApiResultBuilder.create(this, StatusRespBuilder.update(wrPumpBService.updateByPrimaryKeySelective(record)))).build();
    }

    /**
     * @api {post} wr/pump/b/updateBatch [U][G]根据主键批量修改(只修改非null字段)
     * @apiPrivate
     * @apiDescription [G]根据批量主键修改WR_PUMP_B(泵站工程基本信息表)数据,只修改非null字段
     * @apiName (generate)updateBatch selected data
     * @apiGroup WR_PUMP_B-泵站工程基本信息表
     * @apiVersion 1.0.0
     * @apiParam   {String}         pumpCd             泵站工程代码
     * @apiParam   {String}         pumpNm             泵站名称
     * @apiParam   {String}         loc                所在地
     * @apiParam   {String}         projScal           工程规模
     * @apiParam   {String}         pumpTp             泵站类型
     * @apiParam   {Double}         insQ               装机流量
     * @apiParam   {Double}         desHead            设计扬程
     * @apiParam   {Integer}        pumpNum            水泵数量
     * @apiParam   {Double}         allEquWw           设备总取水能力
     * @apiParam   {String}         runCond            运行状况
     * @apiParam   {String}         engManCd           管理单位代码
     * @apiParam   {Date}           ts                 时间戳
     * @apiParam   {String}         nt                 备注
     * @apiParam   {String}         wsReg              供水范围
     * @apiSuccess {Integer}        status             1:修改成功;0:要修改的数据不存在(可能已被删除)
     * @apiSuccess {String}         message            成功/失败消息内容
     * @apiSuccess {Object}         data               额外返回的数据
     * @apiSampleRequest  wr/pump/b/updateBatch
     * * @apiSuccessExample 修改成功:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":1,
     * "message":"成功",
     * "data":null
     *   }
     * }
     * @apiSuccessExample 修改失败:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":0,
     * "message":"失败",
     * "data":null
     *   }
     * }
     * @apiParamExample {json} 请求示例:
     * [{
     * "pumpCd": "420113000043",
     * "pumpNm": "汉江村一泵站",
     * "loc": "汉江村",
     * "projScal": "5",
     * "pumpTp": "2",
     * "insQ": 0.6,
     * "desHead": 12,
     * "pumpNum": 2,
     * "allEquWw": null,
     * "runCond": null,
     * "engManCd": "010894669",
     * "ts": "2014-07-26 16:49:56.0",
     * "nt": null,
     * "wsReg": null
     * }]
     * @apiUse exceptions
     */
    @POST
    @Path("updateBatch")
    @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    public Response updateBatch(List<WrPumpB> record) {
        LOGGER.info("根据主键批量修改(只修改非null字段) 泵站工程基本信息表,参数 WrPumpB:{}", record);
        return Response.ok(ApiResultBuilder.create(this, StatusRespBuilder.update(wrPumpBService.updateBatch(record)))).build();
    }

    /**
     * @api {delete} wr/pump/b/{pumpCd:\\w{12}} [D][G]根据主键删除
     * @apiPrivate
     * @apiDescription [G]根据主键删除WR_PUMP_B(泵站工程基本信息表)数据
     * @apiName (generate)delete by primary key
     * @apiGroup WR_PUMP_B-泵站工程基本信息表
     * @apiVersion 1.0.0
     * @apiSampleRequest wr/pump/b/420113000043
     * @apiParam   {String}         pumpCd             【必须】泵站工程代码
     * @apiSuccess {Integer}        status             1:删除成功;0:要删除的数据不存在(可能已被删除).
     * @apiSuccess {String}         message            成功/失败消息内容
     * @apiSuccess {Object}         data               额外返回的数据
     * @apiSuccessExample 删除成功:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":1,
     * "message":"成功",
     * "data":null
     *   }
     * }
     * @apiSuccessExample 删除失败:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":0,
     * "message":"失败",
     * "data":null
     *   }
     * }
     * @apiUse exceptions
     */
    @DELETE
    @Path("{pumpCd:\\w{12}}")
    @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    public Response delete(@PathParam("pumpCd") String pumpCd) {
        LOGGER.info("根据主键删除 泵站工程基本信息表,参数 pumpCd:{}", pumpCd);
        Integer rows = wrPumpBService.deleteByPrimaryKey(pumpCd);
        return Response.ok(ApiResultBuilder.create(this, StatusRespBuilder.delete(rows))).build();
    }

    /**
     * @api {delete} wr/pump/b/by-filter [D][G]根据条件删除
     * @apiPrivate
     * @apiDescription [G]根据条件删除WR_PUMP_B(泵站工程基本信息表)数据
     * @apiName (generate)delete by filter
     * @apiGroup WR_PUMP_B-泵站工程基本信息表
     * @apiVersion 1.0.0
     * @apiSampleRequest wr/pump/b/by-filter
     * @apiParam   {List(String)}   pumpCdList         (数组)泵站工程代码
     * @apiParam   {String}         pumpCd             泵站工程代码
     * @apiParam   {String}         pumpNm             泵站名称
     * @apiParam   {String}         loc                所在地
     * @apiParam   {List(String)}   projScalList       (数组)工程规模
     * @apiParam   {List(String)}   pumpTpList         (数组)泵站类型
     * @apiParam   {Double}         insQMin            (最小)装机流量
     * @apiParam   {Double}         insQMax            (最大)装机流量
     * @apiParam   {Double}         desHeadMin         (最小)设计扬程
     * @apiParam   {Double}         desHeadMax         (最大)设计扬程
     * @apiParam   {List(Integer)}  pumpNumList        (数组)水泵数量
     * @apiParam   {Double}         allEquWwMin        (最小)设备总取水能力
     * @apiParam   {Double}         allEquWwMax        (最大)设备总取水能力
     * @apiParam   {List(String)}   runCondList        (数组)运行状况
     * @apiParam   {List(String)}   engManCdList       (数组)管理单位代码
     * @apiParam   {String}         engManCd           管理单位代码
     * @apiParam   {Date}           tsBgTm             (开始时间)时间戳
     * @apiParam   {Date}           tsEdTm             (结束时间)时间戳
     * @apiParam   {String}         nt                 备注
     * @apiParam   {String}         wsReg              供水范围
     * @apiSuccess {Integer}        status             通常1或者>1:删除成功;0:没有符合条件的数据.
     * @apiSuccess {String}         message            成功/失败消息内容
     * @apiSuccess {Object}         data               额外返回的数据
     * @apiSuccessExample 删除成功:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":1,
     * "message":"成功",
     * "data":null
     *   }
     * }
     * @apiSuccessExample 删除失败:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":0,
     * "message":"失败",
     * "data":null
     *   }
     * }
     * @apiUse exceptions
     */
    @DELETE
    @Path("by-filter")
    @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    public Response deleteByFilter(WrPumpBQo filter) {
        LOGGER.info("根据条件删除 泵站工程基本信息表,参数 WrPumpBQo:{}", filter);
        Integer rows = wrPumpBService.deleteByFilter(filter);
        return Response.ok(ApiResultBuilder.create(this, StatusRespBuilder.delete(rows))).build();
    }
}
